<!-- favicon -->
<link rel="apple-touch-icon" sizes="180x180" href="{{ site.baseurl }}/apple-touch-icon.png">
<link rel="icon" type="image/png" sizes="32x32" href="{{ site.baseurl }}/favicon-32x32.png">
<link rel="icon" type="image/png" sizes="16x16" href="{{ site.baseurl }}/favicon-16x16.png">
<link rel="shortcut icon" href="{{ site.baseurl }}/favicon.ico">
<link rel="manifest" href="{{ site.baseurl }}/site.webmanifest">
<link rel="mask-icon" href="{{ site.baseurl }}/safari-pinned-tab.svg" color="#5bbad5">
<meta name="msapplication-TileColor" content="#603cba">
<meta name="theme-color" content="#ffffff">

<!-- fonts -->
{% asset font-awesome.min.css %}
<style type="text/css">
 {% capture fonts_file %}
   {% include fonts.css %}
 {% endcapture %}
 {{ fonts_file | scssify }}
</style>

<!-- styles -->
{% asset slick.css %}
{% asset normalize.css %}
{% asset syntax.css %}
{% asset site.css %}
{% asset tab.css %}
{% asset submenu.css %}
{% asset docs.css %}
{% asset cards.css %}
{% asset featherlight.min.css %}

<!-- scripts -->
{%- unless site.mode == "module" %}
{%- if page.lang == "ru" %}
    <script src="https://embed.small.chat/T037FSPS9C02AE1YJWQ2.js" async></script>
{%- else %}
    <script src="https://embed.small.chat/T037FSPS9C01V5672DPV.js" async></script>
{%- endif %}
{%- endunless %}
{% asset jquery.min.js %}
{% asset jquery.cookie.min.js %}
{% asset bootstrap.min.js %}
{% asset slick.min.js %}

{% asset popper.min.js %}
{% asset tippy-bundle.umd.min.js %}
<script>
  $(document).ready(function() {
    tippy('[title]', {
      content(reference) {
        const title = reference.getAttribute('title');
        reference.removeAttribute('title');
        return title;
      },
      maxWidth: 400,
      allowHTML: true
    });
  });
</script>

{% asset jquery.navgoco.min.js %}
{% asset anchor.min.js %}
{% asset toc.js %}
{% asset details.js %}
{% asset tab.js %}
{% asset clipboard.min.js %}
{% asset customscripts.js %}
{% asset pdf.min.js %}
{% asset pdf-slider.js %}
{% asset popup-form.js %}
<script>
    $(document).ready(function() {
        // Initialize navgoco with default options
        $("#mysidebar").navgoco({
            caretHtml: '',
            accordion: false,
            openClass: 'active', // open
            save: false, // leave false or nav highlighting doesn't work right
            cookie: {
                name: 'navgoco',
                expires: false,
                path: '/'
            },
            slide: {
                duration: 400,
                easing: 'swing'
            }
        });

        $("#collapseAll").click(function(e) {
            e.preventDefault();
            $("#mysidebar").navgoco('toggle', false);
        });

        $("#expandAll").click(function(e) {
            e.preventDefault();
            $("#mysidebar").navgoco('toggle', true);
        });

    });
    $(function () {
        $('[data-toggle="tooltip"]').tooltip()
    })
    $(document).ready(function() {
        $("#tg-sb-link").click(function() {
            $("#tg-sb-sidebar").toggle();
            $("#tg-sb-content").toggleClass('col-md-9');
            $("#tg-sb-content").toggleClass('col-md-12');
            $("#tg-sb-icon").toggleClass('fa-toggle-on');
            $("#tg-sb-icon").toggleClass('fa-toggle-off');
        });
    });
</script>
{% if page.datatable == true %}
<!-- Include the standard DataTables bits -->
{% asset jquery.dataTables.css %}
{% asset jquery.dataTables.min.js %}
<!-- First, this walks through the tables that occur between ...-begin
     and ...-end and add the "datatable" class to them.
     Then it invokes DataTable's standard initializer
     Credit here: http://www.beardedhacker.com/blog/2015/08/28/add-class-attribute-to-markdown-table/
  -->
<script>
  $(document).ready(function(){
      $('div.datatable-begin').nextUntil('div.datatable-end', 'table').addClass('display');
      $('table.display').DataTable( {
          paging: true,
          stateSave: true,
          searching: true
      });
   });
</script>
{% endif %}
<script type="text/javascript">
    $(document).ready(function () {
        $('[data-slick]').slick({
        infinite: true,
        slidesToShow: 3,
        autoplaySpeed: 5000,
        variableWidth: true,
        centerMode: true,
        initialSlide: 1,
        responsive: [{
            breakpoint: 1500,
            settings: {
                initialSlide: 0,
                slidesToShow: 1
            }
        }]
        });
    });
</script>
<!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
<!--[if lt IE 9]>
{% asset html5shiv.js %}
{% asset respond.min.js %}
<![endif]-->

 <script type="text/javascript">
    $(document).ready(function () {

        function getCookie (name) {
            let value = '; ' + document.cookie;
            let parts = value.split(`; ${name}=`);
            if (parts.length == 2) return parts.pop().split(';').shift();
        }

        var token = getCookie('license-token') ? getCookie('license-token') : getCookie('demotoken');
        if (token) {
            window.yaParams = { "license-token": token };
            ym(78422802, 'params', window.yaParams||{});
        }

    });
</script>

{%- unless site.mode == "module" %}
<!-- Yandex.Metrika counter -->
<script type="text/javascript" >
    (function(m,e,t,r,i,k,a){m[i]=m[i]||function(){(m[i].a=m[i].a||[]).push(arguments)};
    m[i].l=1*new Date();k=e.createElement(t),a=e.getElementsByTagName(t)[0],k.async=1,k.src=r,a.parentNode.insertBefore(k,a)})
    (window, document, "script", "https://mc.yandex.ru/metrika/tag.js", "ym");

    ym(78422802, "init", {
         clickmap:true,
         trackLinks:true,
         accurateTrackBounce:true,
         webvisor:true
    });

    window.addEventListener("smallchat:ready", function() {
      Smallchat.on("chat:opened", () => {
        ym(78422802, 'reachGoal', 'open_online_chat');
      })
    })
 </script>
 <noscript><div><img src="https://mc.yandex.ru/watch/78422802" style="position:absolute; left:-9999px;" alt="" /></div></noscript>
 <!-- /Yandex.Metrika counter -->

 <!-- Global site tag (gtag.js) - Google Analytics -->
    <script async src="https://www.googletagmanager.com/gtag/js?id=G-4X28CEP7W2"></script>
    <script>
        window.dataLayer = window.dataLayer || [];
        function gtag(){dataLayer.push(arguments);}
        gtag('js', new Date());
        gtag('config', 'G-4X28CEP7W2');
    </script>
<!-- /Global site tag (gtag.js) -->
{%- endunless %}
